package p270jp.pxv.android.viewholder;

import android.view.View;
import p165fo.C3114c;
import p270jp.pxv.android.R;
import p270jp.pxv.android.event.LoadDetailIllustSeriesEvent;
import p270jp.pxv.android.legacy.model.PixivIllustSeries;
import p270jp.pxv.android.model.PixivIllustSeriesContext;
import p270jp.pxv.android.view.DetailIllustSeriesView;
import p270jp.pxv.android.viewholder.CalcHeightViewHolder;

/* renamed from: jp.pxv.android.viewholder.DetailIllustSeriesViewHolder */
/* loaded from: classes2.dex */
public class DetailIllustSeriesViewHolder extends CalcHeightViewHolder {
    private DetailIllustSeriesView detailIllustSeriesView;

    /* renamed from: jp.pxv.android.viewholder.DetailIllustSeriesViewHolder$DetailIllustSeriesItem */
    /* loaded from: classes2.dex */
    public static class DetailIllustSeriesItem extends CalcHeightViewHolder.CalcHeightItem {
        private final long illustId;
        private PixivIllustSeries illustSeries;
        private PixivIllustSeriesContext illustSeriesContext;

        public DetailIllustSeriesItem(PixivIllustSeries pixivIllustSeries, PixivIllustSeriesContext pixivIllustSeriesContext, long j) {
            this.illustSeriesContext = pixivIllustSeriesContext;
            this.illustSeries = pixivIllustSeries;
            this.illustId = j;
        }

        public long getIllustId() {
            return this.illustId;
        }

        public PixivIllustSeries getIllustSeries() {
            return this.illustSeries;
        }

        public PixivIllustSeriesContext getIllustSeriesContext() {
            return this.illustSeriesContext;
        }

        public void setIllustSeriesContext(PixivIllustSeriesContext pixivIllustSeriesContext) {
            this.illustSeriesContext = pixivIllustSeriesContext;
        }
    }

    public DetailIllustSeriesViewHolder(View view) {
        super(view);
        this.detailIllustSeriesView = (DetailIllustSeriesView) view.findViewById(R.id.detail_illust_series_view);
    }

    public static int getLayoutRes() {
        return R.layout.view_detail_illust_series;
    }

    @Override // p270jp.pxv.android.viewholder.BaseViewHolder
    public void bind(Object obj) {
        super.bind(obj);
        DetailIllustSeriesItem detailIllustSeriesItem = (DetailIllustSeriesItem) obj;
        C3114c.m6284b().m6280f(new LoadDetailIllustSeriesEvent(detailIllustSeriesItem.getIllustId()));
        PixivIllustSeriesContext illustSeriesContext = detailIllustSeriesItem.getIllustSeriesContext();
        if (illustSeriesContext != null) {
            this.detailIllustSeriesView.m4501a(detailIllustSeriesItem.getIllustSeries(), illustSeriesContext);
        }
        postCalcViewHeight(detailIllustSeriesItem);
    }
}
